home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
os2
/
gbm.arj
/
GBMV2.HLP
(
.txt
)
< prev
next >
Wrap
OS/2 Help File
|
1994-04-15
|
25KB
|
767 lines
ΓòÉΓòÉΓòÉ 1. Introduction to GbmV2 ΓòÉΓòÉΓòÉ
This is a simple bitmap viewer.
Bitmap files in various formats may be loaded into memory. This is the actual
bitmap data.
The program displays a view of the bitmap in its window. This is called the
view bitmap. The choice of how the view is made from the actual data may be
changed from the View menu.
If the bitmap is smaller than the window, it is displayed centralised within
the window.
If the bitmap is larger than the window, then scrollbars may be used to pick
the visible part of the bitmap.
Once a bitmap is loaded, it may be printed to the default PM printer.
All, or a part of, the current bitmap can be selected, and then copied to the
clipboard.
1bpp bitmaps are typically tricky to handle under OS/2 PM.
This program will display a 1bpp bitmap using the 2 colours in the bitmap files
header, rather than the users current PM colour scheme.
While files are loading, saving, printing etc., this program prevents you from
using its other functions.
From the menu bar you can use:
File
To transfer the text to and from disk
Edit
To transfer some or all of the bitmap to the OS/2 clipboard
Bitmap
To perform simple operations on the bitmap
View
To select how you see the current bitmap
Help
To display various types of help for using this utility.
You can display online help for GbmV2 by using the following methods.
o For help about any pull-down option, highlight it and press F1.
o For help about any displayed dialog box, select the Help pushbutton.
o To see the Help Index, use the Help pull-down, or press F11.
o To see the Help table of contents, display a help panel and use the Help
Options pull-down (or press Ctrl+C).
ΓòÉΓòÉΓòÉ 2. File menu ΓòÉΓòÉΓòÉ
The File menu allows you to load a new bitmap, to save to a bitmap file, and to
print. You can use:
New
To clear out the current bitmap.
Open
To discard the current bitmap and read a new file from disk. The file to
load is selected via the Bitmap File dialog.
Save
To save the current bitmap to a file, under the current filename. The
actual bitmap data, rather than the view what you see of it that is
saved.
Save as
To save the current bitmap to a file with a filename you specify. The
filename to save to is specified via the Bitmap File dialog. The actual
bitmap data, rather than the view what you see of it that is saved.
Print
To print the current bitmap to the default PM printer.
Snapshot
To take a snapshot of the screen.
ΓòÉΓòÉΓòÉ 2.1. New ΓòÉΓòÉΓòÉ
Will clear any loaded bitmap from memory.
You can also begin a New file by pressing Ctrl+N.
ΓòÉΓòÉΓòÉ 2.2. Open ΓòÉΓòÉΓòÉ
Brings up a dialog box which allows you to specify the bitmap file to load. The
file to load to is specified via the Bitmap File dialog.
You can also Open a file by pressing Ctrl+O.
ΓòÉΓòÉΓòÉ 2.3. Save ΓòÉΓòÉΓòÉ
Saves the currently loaded bitmap.
It is the actual bitmap data, not the view you see, that is actually saved. For
example, the actual bitmap map can be 24 bit, but you may be looking at an (8
bit) error diffused version on the screen.
If you wish to save under a new filename, use Save as instead.
You can also Save to a file by pressing Ctrl+S.
ΓòÉΓòÉΓòÉ 2.4. Save As ΓòÉΓòÉΓòÉ
Saves the currently loaded bitmap, but under a new filename. The filename to
save to is specified via the Bitmap File dialog.
If you wish to save under the current name, use Save instead.
It is the actual bitmap data, not the view you see, that is actually saved. For
example, the actual bitmap can map be 24 bit, but you may be looking at an (8
bit) error diffused version on the screen.
You can also Save as to a named file by pressing Ctrl+A.
ΓòÉΓòÉΓòÉ 2.5. Print ΓòÉΓòÉΓòÉ
Prints the currently loaded bitmap to the default PM printer.
It is the screen view of the bitmap, not the actual bitmap data itself, that is
transferred to the printer.
Works best when the default PM printer is a PostScript printer, as they
typically can simulate 26 gray-scale levels via halftoning.
You can also Print by pressing Ctrl+P.
ΓòÉΓòÉΓòÉ 2.6. Snapshot ΓòÉΓòÉΓòÉ
This discards any currently loaded bitmap, and then replaces it with a snapshot
of the current desktop.
This can then be cropped to the desired size by using the Select menuitem to
pick a subrectangle, and then the Crop to selection menuitem to trim to that
size.
When you select Snapshot, GbmV2 does the following :-
Makes itself invisible.
Waits 1 second, to allow windows that were previously obscured by GbmV2 to
repaint themselves.
Copies the screen to an internal bitmap.
Makes itself visible again.
Queries the data from this bitmap.
As the Snapshotted data has come from the screen, GbmV2 will set the viewing
mode to Raw PM mapping. For a description of viewing modes, select the help on
the View menu.
ΓòÉΓòÉΓòÉ 3. Edit menu ΓòÉΓòÉΓòÉ
The Edit menu allows you to select a sub-rectangle of the bitmap. Some
functions on the Bitmap menu behave differently depending upon whether there is
a current selection or not. For example, Reflect horizontally will reflect just
the selection if a selection is defined, else it will reflect the whole image.
It is also possible to copy selections to the clipboard. You can use:
Undo
To undo the last operation performed on the bitmap.
Select
To select a part of the current bitmap.
Deselect
To cancel the current selection.
Copy
This copies the current selection to the clipboard.
Paste
This replaces the current bitmap with the clipboard contents.
ΓòÉΓòÉΓòÉ 3.1. Undo ΓòÉΓòÉΓòÉ
The Undo operation undoes the last change to the bitmap.
It is only selectable after a change has been done to the bitmap, such as those
provided under the Bitmap menu.
In low memory situations, it may be impossible to undo a previous operation.
Certain operations, such as New and Open are not undoable.
ΓòÉΓòÉΓòÉ 3.2. Select ΓòÉΓòÉΓòÉ
After choosing this menu selection, the mouse pointer changes into a
angle-bracket-L shape which you move to the bottom left of the region of the
bitmap you wish to select, and then press the left mouse button. Then it
changes to an angle-bracket-7 shape, which you then move to the top right of
the region you wish to select, and then press the left mouse button.
This newly selected region becomes selected and is marked with a rectangle.
This is the region that can subsequently become copied to the clipboard using
Copy.
The Esc key cancels the selection process.
ΓòÉΓòÉΓòÉ 3.3. Deselect ΓòÉΓòÉΓòÉ
This menu item removes the current selection.
You can also Deselect by pressing Esc, or by clicking the right mouse button on
the bitmap.
ΓòÉΓòÉΓòÉ 3.4. Copy ΓòÉΓòÉΓòÉ
If there is a current selection, then it is copied to the clipboard.
Otherwise the whole bitmap is copied to the clipboard.
A region can be selected using Select.
It is the version you see on the screen that is copied to the clipboard, not
the actual original bitmap data itself.
You can also Copy by pressing Ctrl+Ins.
ΓòÉΓòÉΓòÉ 3.5. Paste ΓòÉΓòÉΓòÉ
This can only occur if there is bitmap data in the clipboard.
The current bitmap is replaced by the data from the clipboard.
Note: Bitmap data in the clipboard is only kept to the same quality (or less)
as the screen. ie: if the screen is 8bpp (as in super VGA for example) and you
place a 24bpp bitmap in the clipboard, it is actually only held by Presentation
Manager at 8bpp. Accordingly GBM considers the pasted bitmap to be of the lower
number of bits per pixel.
You can also Paste by pressing Shift+Ins.
ΓòÉΓòÉΓòÉ 4. Bitmap menu ΓòÉΓòÉΓòÉ
The Bitmap menu allows you to perform simple operations on the current bitmap.
You can use:
Reflect horizontally
To reflect the bitmap left-to-right.
Reflect vertically
To reflect the bitmap left-to-right.
Rotate 90 degrees
To rotate the bitmap 90 degrees anticlockwise.
Rotate 180 degrees
To rotate the bitmap 180 degrees.
Rotate 270 degrees
To rotate the bitmap 90 degrees clockwise.
Transpose x for y
To transpose the bitmap x for y.
Crop to selection
To discard all but the selected part of the bitmap.
Colour space...
To map bitmap pixels / palettes between colour spaces.
Map...
To map between various numbers of bits per pixel and between various
palettes.
Resize...
To change the size of, ie: to scale the current bitmap.
The Undo menuitem can be used to undo the last operation performed on a bitmap.
ΓòÉΓòÉΓòÉ 4.1. Reflect horizontally ΓòÉΓòÉΓòÉ
If there is a current selection, it is reflected left-to-right.
Otherwise the whole bitmap is reflected left-to-right.
Reflecting vertically can be done using the similar Reflect vertically
selection.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.2. Reflect vertically ΓòÉΓòÉΓòÉ
If there is a current selection, it is reflected top-to-bottom.
Otherwise the whole bitmap is reflected top-to-bottom.
Reflecting horizontally can be done using the similar Reflect horizontally
selection.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.3. Rotate 90 degrees ΓòÉΓòÉΓòÉ
If there is a current selection, and it is square, it can be rotated through 90
degrees clockwise. Non square selections can not be rotated through 90 degrees.
If there is no selection, then the whole bitmap is rotated through 90 degrees.
Other rotations may be acheived via the Rotate 180 degrees and Rotate 270
degrees commands.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.4. Rotate 180 degrees ΓòÉΓòÉΓòÉ
If there is a current selection, it is rotated through 180 degrees.
Otherwise the whole bitmap is rotated through 180 degrees.
Other rotations may be acheived via the Rotate 90 degrees and Rotate 270
degrees commands.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.5. Rotate 270 degrees ΓòÉΓòÉΓòÉ
If there is a current selection, and it is square, it can rotated be through
270 degrees clockwise. Non square selections can not be rotated through 270
degrees.
If there is no selection, then the whole bitmap is rotated through 270 degrees.
Other rotations may be acheived via the Rotate 90 degrees and Rotate 180
degrees commands.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.6. Transpose x for y ΓòÉΓòÉΓòÉ
If there is a current selection, and it is square, it can be transposed x for
y. Non square selections can not be transposed.
If there is no selection, then the whole bitmap is transposed.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.7. Crop to selection ΓòÉΓòÉΓòÉ
This discards all the bitmap except the selected bit.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.8. Colour space... ΓòÉΓòÉΓòÉ
This menuitem will cause the Colour space dialog to appear. From here mappings
between intensity, L* cyclometric and gamma corrected colour spaces may be
performed.
This always applies to the whole bitmap. You cannot colour space map just the
current selection.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.9. Map... ΓòÉΓòÉΓòÉ
This menuitem will cause the Map dialog to appear. From here mappings between
various numbers of bits per pixel and various palettes may be performed.
This always applies to the whole bitmap. You cannot map just the current
selection.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 4.10. Resize... ΓòÉΓòÉΓòÉ
This menuitem will cause the Resize dialog to appear. From here the size of the
current bitmap may be changed.
This always applies to the whole bitmap. You cannot resize just the current
selection.
Other operations on the bitmap can be accessed from the Bitmap menu.
ΓòÉΓòÉΓòÉ 5. View menu ΓòÉΓòÉΓòÉ
The View menu allows you to choose what representation (or view) of the bitmap
you have loaded will be used for display on the screen.
You can use:
Raw PM mapping
To tell this program to perform no image enhancment for display
purposes. The view bitmap is displayed as good as PM will, with no
improvement.
Halftoned
To tell this program to show a halftoned version of the bitmap to the
user, rather than the actual bitmap data itself. This generally looks
slightly better and is quick to do.
Error diffused
To tell this program to show a error-diffused version of the bitmap to
the user, rather than the actual bitmap data itself. This generally
looks much better, but takes longer to do.
This program makes a guess at the type of display adaptor you are using and
chooses the most appropriate form of halftoning or error-diffusion to use.
Specifically, it has algorithms known to work well on :-
16 colour VGA
256 colour 8514/A, XGA and Image Adaptor/A.
65536 direct colour XGA-2.
If you actually wish to change the bitmap data itself, then you can use the Map
dialog to do this.
ΓòÉΓòÉΓòÉ 5.1. Raw PM mapping ΓòÉΓòÉΓòÉ
This tells this program to not perform any image enhancement that will make a
bitmap look closer to its true colours and shades on the screen.
You can also select view Raw PM mapping by pressing Ctrl+R.
It is possible to select other views from the View menu.
ΓòÉΓòÉΓòÉ 5.2. Halftoned ΓòÉΓòÉΓòÉ
This tells this program that it should present a halftoned view of the current
bitmap to the user.
The actual bitmap data itself is not affected, only what you see on the screen.
Hence if Save or Save as are used, the unchanged actual bitmap data is saved.
Halftoning is generally quicker than error diffusion.
You can also select view Halftoned by pressing Ctrl+H.
It is possible to select other views from the View menu.
ΓòÉΓòÉΓòÉ 5.3. Error diffused ΓòÉΓòÉΓòÉ
This tells this program that it should present an error-diffused picture of the
current bitmap to the user.
The actual bitmap data itself is not affected, only what you see on the screen.
Hence if Save or Save as are used, the unchanged actual bitmap data is saved.
Error diffusion takes longer than halftoning, but the quality is generally
higher, especially on continuous tone images.
You can also select view Error diffused by pressing Ctrl+E.
It is possible to select other views from the View menu.
ΓòÉΓòÉΓòÉ 6. Help menu ΓòÉΓòÉΓòÉ
Use this menu to bring up the help system.
ΓòÉΓòÉΓòÉ 6.1. Help for help ΓòÉΓòÉΓòÉ
Use this choice to bring up the help for the help system.
ΓòÉΓòÉΓòÉ 6.2. Extended Help ΓòÉΓòÉΓòÉ
Use this choice to bring up general help for GbmV2.
ΓòÉΓòÉΓòÉ 6.3. Keys help ΓòÉΓòÉΓòÉ
The following keys may be used in the main window :-
o Ctrl+N selects New which clears the bitmap.
o Ctrl+O to Open a new bitmap file via the Bitmap File dialog.
o Ctrl+S to Save the current bitmap.
o Ctrl+A selects Save as which saves the bitmap under a new filename, specified
via the Bitmap File dialog.
o Ctrl+P to Print the current bitmap.
o Ctrl+R to select Raw PM mapping view mode.
o Ctrl+H to select Halftoned view mode.
o Ctrl+E to select Error diffused view mode.
o Esc to Deselect any current selection.
o Ctrl+Ins to Copy the current selection to the clipboard.
o Shift+Ins to Paste the current clipboard contents over the current bitmap.
o The Arrow keys may be used to scroll around the bitmap. Note that
Shift+Arrows behave like page up/down/left or right.
o F3 to close GbmV2.
ΓòÉΓòÉΓòÉ 6.4. Help index ΓòÉΓòÉΓòÉ
Use this to bring up an index of the help.
ΓòÉΓòÉΓòÉ 7. Colour space dialog ΓòÉΓòÉΓòÉ
If a light is physically twice as bright, the eye does not necessarily see it
as twice as bright. Also, if a pixel is written onto a monitor screen with
twice the value, the physical intensity of the pixel is not necessarily double.
How exactly should numbers inside a bitmap file relate to physical or perceived
intensitys when displayed on the screen?
In OS/2 PM perceived intensitys are proportional to the values in the bitmap
file. Pixels in such a bitmap are in the L* cyclometric colour space. This is
done to ensure that an even scale of pixel values gives an even scale of
brightness, when viewed by the human eye.
Ray Tracers often write pixel values in the bitmap proportional to the physical
intensity computed for that ray. Also this may be more suitable if certain
image processing/enhancement techniques are to be applied to the image data.
Such data is in the intensity colour space.
Finally, if a bitmap holds values computed in such a way as to compensate for
the gamma of the monitor (ie: intensitys transformed to cancel out the gamma of
the monitor), then the data is in a gamma corrected colour space. Bitmap data
that has come directly from a greyscale or colour scanner may also be in a
gamma corrected colour space.
Of course, despite OS/2 PM using the L* cyclometric colour space, this machine
is attached to a monitor with specific characteristics and your eyes also have
their own characteristics. But it is the responsibility of OS/2 PM screen
drivers to perform the mapping from the L* cyclometric colour space to suitable
palette entrys which take into account both the gamma (and shelf) of the
monitor in use, and the visual characteristics of the human eye. This is done
transparently to PM applications.
The various mappings allow you map between any 2 of these 3 colour spaces.
Examples of typical usage follow :-
Intensity to L* cyclometric
You have loaded a bitmap file where the pixel values are proportional to
the physical intensity. Such bitmaps often tend to look too dark under
OS/2 PM. This will map the pixels to the L* cyclometric colour space,
giving a better rendition under OS/2 PM.
Intensity to gamma corrected
The resulting bitmap, may still look too dark/light under OS/2 PM, but
when saved, and displayed on a monitor with the relevant gamma and shelf
with a program that directly controls the hardware, the correct
rendition will result.
L* cyclometric to Intensity
You have a regular OS/2 PM bitmap, and wish to make the pixel values in
the file directly proportional to the physical intensity. You might do
this to generate a bitmap suitable for feeding into a Ray Tracer as a 2D
texture map.
L* cyclometric to gamma corrected
As above, but generating bitmap bits suitable for directly placing in
hardware registers.
Gamma corrected to Intensity
You have loaded a bitmap that has come directly from some scanner
hardware, and wish to make bitmap where bits are proportional to
intensity.
Gamma corrected to L* cyclometric
You have loaded a bitmap from a scanner, and wish to make a bitmap best
suited for OS/2 PM.
When mapping to or from the gamma corrected colour space, the gamma and shelf
values are significant. When the gamma corrected colour space is not involved,
the gamma and shelf parameters are greyed. For example, the gamma of the 8514
monitor is about 2.1.
The shelf parameter will normally be left 0.0, but has significance for some
monitors. For example, on some 8514 monitors, if a greyscale of bitmap pixels 0
to 255 is displayed, the first 35 values come out equally black. So, here a
shelf of 0.136 (as 0.136*255=35) should be used.
Mapping of this sort should really be done on 24 bit data, before
error-diffusion or halftoning takes place.
If the current bitmap is 24 bpp, then each bitmap pixel is mapped. Otherwise,
the palette entrys are mapped.
This dialog is brought up from the Colour space... menuitem.
ΓòÉΓòÉΓòÉ 8. Map dialog ΓòÉΓòÉΓòÉ
When the Convert pushbutton is pressed on this dialog, the current bitmap is
expanded from however many bits per pixel it currently is to 24 bits per pixel
(with no palette).
Then a mapping is performed, to the desired number of bits per pixel and
palette specified.
For some mappings, some or all of the values in the Values part of the dialog
box are used. Those which have no effect are greyed.
Also, when mapping to some palettes, the option of using halftoning or error
diffusion may be available. When these are unavailable, they are greyed.
1bpp, black and white
The bitmap is mapped to black and white. This is done by mapping each
pixel to a grey value, and then seeing if the brightness is in the high
50% or not.
4bpp, 8 colours
This maps each pixel to one of black, white, red, green, blue, cyan,
magenta or yellow. This option is handy for generating bitmaps to be fed
into colour printers.
4bpp, 16 colour VGA palette
Each pixel is mapped to a colour in the VGA palette used by DOS, Windows
and OS/2 PM.
4bpp, 16 shades of grey
Each pixel is mapped to one of 16 shades of grey.
8bpp, 7Rx8Gx4B palette
This is a palette consisting of 7 levels of red, 8 levels of green and 4
levels of blue. It is constructed this way because the eye is most
sensitive to green, then to red, and least to blue. Most 32 bit OS/2 PM
drivers, and the old 16 bit 8514/A driver use a palette with these
colours in.
8bpp, 6Rx6Gx6B palette
The old 16 bit XGA-1 OS/2 PM driver used a 6 red by 6 green by 6 blue
palette.
8bpp, 256 shades of grey
Each pixel is mapped to a greyscale via a weighted sum of the red, green
and blue components. Grey = 30% red + 59% green + 11% blue. These
correspond to the eyes relative sensitivities to these primary colours.
8bpp, 64R+64G+64B tri-pel palette
The palette of the resulting bitmap has 64 shades of red, 64 of green
and 64 of blue. Pixels in the source alternately have their red, green
or blue component considered and a pixel written out from the relevant
part of the palette. Therefore colour resolution is 6 bits of each of
red, green and blue, at the expense of artifacts produced caused by the
alternation and also at the expense of reducing the image brightness by
a factor of 3.
24 bpp, keep R bits red, G green, B blue
Although the resulting image has 24bpp, only R bits of red, G of green
and B of blue are non-zero. XGA-2 in its 16bpp mode has 65536 colours,
which are composed from 32 levels of red, 64 of green and 32 of blue.
Thus R=5, G=6, B=5 can be used to transform an image into what can be
displayed on XGA-2.
8bpp, as above, find N most used cols.
After performing the above step, the 24bpp data is analysed to find the
N most frequently occuring colours. Any pixels in the image in the N
most used colours are mapped directly to that colour. Any pixel not in
the N most used colours is mapped to the closest colour in the N most
used. This may be used to make the best rendition for display by a DOS
program that uses VGA 320x200 8bpp mode by setting R=6, G=6, B=6, N=256,
since only 6 bits are significant in the VGA palette DACs, and we only
have 256 colours in the palette.
Important
These mappings apply to the actual bitmap data and are nothing to do with the
viewing options available from the View menu. Therefore, if you load a bitmap,
error diffuse via this dialog box, and then save, the saved file is
error-diffused. This directly contrasts the View menu, where the error
diffusion is purely for display purposes.
This dialog is brought up from the Map... menuitem.
ΓòÉΓòÉΓòÉ 9. Resize dialog ΓòÉΓòÉΓòÉ
When the Resize pushbutton is pressed, the current bitmap is scaled to the new
size specified in the entryfields.
This function always operates on the whole bitmap, not just the selected part
(if there is a selection).
Expansion is done by pixel replication, and reduction is done by dropping
pixels (no photographic quality interpolation is done).
The bitmap has other buttons to help you pick the new sizes.
By entering a number in the N entryfield, and pressing a x N button, the width
or height can be multiplied by that number. Similarly, to scale down by a
number, use a / N button.
The Match height and Match width buttons are designed to make it easy to pick
either the width or the height, and then work out the corresponding height or
width that will preserve the 1:1 aspect ratio. An example of the Match Width
feature :-
Given bitmap is currently 600x400
User types in 800 in the Width entryfield.
User presses Match Width
533 appears in the Height entryfield.
This was worked out as follows :-
Factor = NewWidth / OldWidth
= 800 / 600
= 1.33 approx
NewHeight = Factor x OldHeight
= 1.33 x 400
= 533 approx
These features are designed to avoid the need to use a calculator to work out
the new sizes.
This dialog is brought up from the Resize... menuitem.
ΓòÉΓòÉΓòÉ 10. Credits ΓòÉΓòÉΓòÉ
This code is the work of :-
{{{ Andy Key
Internet: ak@vnet.ibm.com
IBM-VNET: AKEY AT HVTVM5
Electronic addresses valid at least until September 1994.